home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 49 / Amiga Format CD49 (2000-01-17)(Future Publishing)(GB)(Track 1 of 3)[!][issue 2000-02].iso / -serious- / comms / other / novia / src / novia_rexx.c < prev    next >
C/C++ Source or Header  |  1999-12-06  |  21KB  |  642 lines

  1. #include <novia/novia_global.h>
  2. #include <novia/novia_misc.h>
  3. #include <novia/novia_funcs.h>
  4. #include <dos/dostags.h>
  5. #include <rexx/storage.h>
  6. #include <clib/rexxsyslib_protos.h>
  7. #include <pragma/noviasys_lib.h>
  8.  
  9. extern struct MainPortConfig *mainportconfig;
  10.  
  11.  
  12. /****   PROTOTYPES   ****/
  13.  
  14. struct Task *startrexxprg(char *ProgramName);
  15. void rexx_main();
  16. void DoRexxMsg(RexxMsg *rexxmsg);
  17.  
  18. /************************/
  19.  
  20. UserData *uuuu=0;
  21.  
  22. struct Task *startrexxprg(char *ProgramName)
  23. {
  24.     struct PortData *cport=(PortData *)FindTask(NULL)->tc_UserData;
  25.     struct Task *RexxTask=NULL;
  26.     struct RexxProg *rexxprog=NULL;
  27.     char buffer[200];
  28.     char error=FALSE;
  29.     BPTR in=NULL;
  30.     BPTR out=NULL;
  31.     if ((rexxprog=AllocVec(sizeof(RexxProg),MEMF_ANY|MEMF_CLEAR)))
  32.     {
  33.         strcpy(rexxprog->ProgramName,ProgramName);
  34.         Forbid();
  35.         mainportconfig->rexxtempcounter++;
  36.         sprintf(rexxprog->TaskName,"novia_rexx_task%u",mainportconfig->rexxtempcounter);
  37.         sprintf(rexxprog->tempfile,"ram:novia_rexx_prog.%d",mainportconfig->rexxtempcounter);
  38.         Permit();
  39.         if ((in=Open(ProgramName,MODE_OLDFILE)) && (out=Open(rexxprog->tempfile,MODE_NEWFILE)))
  40.         {
  41.             ULONG counter;
  42.             Seek(in,0,OFFSET_END);
  43.             counter=Seek(in,0,OFFSET_BEGINNING);
  44.             if (counter!=-1)
  45.             {
  46.                 char *iobuffer;
  47.                 if ((iobuffer=AllocVec(counter+1,MEMF_ANY)))
  48.                 {
  49.                     if (Read(in,iobuffer,counter)==counter)
  50.                     {
  51.                         sprintf(buffer,"/*NOVIA REXX PROGRAM */\naddress '%s'\n",cport->rexxport->mp_Node.ln_Name);
  52.                         if (Write(out,buffer,strlen(buffer))!=-1)
  53.                         {
  54.                             if (Write(out,iobuffer,counter)!=-1)
  55.                             {
  56.                                 FreeVec(iobuffer);
  57.                                 iobuffer=NULL;
  58.                             }
  59.                             else
  60.                                 error=TRUE;
  61.                         }
  62.                         else
  63.                             error=TRUE;
  64.                     }
  65.                     else
  66.                         error=TRUE;
  67.                 }
  68.                 else
  69.                     error=TRUE;
  70.             }
  71.             else
  72.                 error=TRUE;
  73.         }
  74.         else
  75.             error=TRUE;
  76.         if (in)Close(in);in=NULL;
  77.         if (out)Close(out);out=NULL;
  78.         if (!error)
  79.         {
  80.             struct TagItem RexxProcTagList[] =
  81.             {
  82.                 {    NP_Entry,        (ULONG)rexx_main},
  83.                 {    NP_Name,            (ULONG)rexxprog->TaskName},
  84.                 {    NP_StackSize,    20000},
  85.                 {    TAG_DONE,        TAG_DONE},
  86.             };
  87.             rexxprog->cport=cport;
  88.             Forbid();
  89.             if ((RexxTask=(struct Task *)CreateNewProc(RexxProcTagList)))
  90.             {
  91.                 RexxTask->tc_UserData=rexxprog;
  92.             }
  93.             else
  94.             {
  95.                 error=TRUE;
  96.                 FreeVec(rexxprog);
  97.             }
  98.             Permit();
  99.         }
  100.         else
  101.         {
  102.             FreeVec(rexxprog);
  103.         }
  104.         if (!error)
  105.         {
  106.             ULONG sigs=0;
  107.             BYTE    quit=FALSE;
  108.             ULONG sb_rtport=1<<cport->rtport->mp_SigBit;
  109.             struct message *msg;
  110.             while (!quit && cport->network.online && !cport->ProgramClose)
  111.             {
  112.                 sigs=WaitSig(sb_rtport);
  113.                 if (sb_rtport & sigs)
  114.                 {
  115.                     while ((msg=(message *)GetMsg(cport->rtport)))
  116.                     {
  117.                         switch (msg->msg_type)
  118.                         {
  119.                             case MSG_NREXX_START:
  120.                                 cport->RexxOpenCounter++;
  121.                                 msg->msg_type=MSG_NREXX_OK;
  122.                                 ReplyMsg((Message *)msg);
  123.                                 break;
  124.                             case MSG_NREXX_END:
  125.                                 cport->RexxOpenCounter--;
  126.                                 msg->msg_type=MSG_NREXX_OK;
  127.                                 ReplyMsg((Message *)msg);
  128.                                 quit=TRUE;
  129.                                 break;
  130.                         }
  131.                     }
  132.                 }
  133.             }
  134.         }
  135.     }
  136.     return NULL;
  137. }
  138.  
  139.  
  140.  
  141. void rexx_main()
  142. {
  143.     LONG returncode=20;
  144.     struct RexxProg *rexxprog=(RexxProg *)FindTask(NULL)->tc_UserData;
  145.     struct PortData *cport=rexxprog->cport;
  146.     struct MsgPort *replyport=CreateMsgPort();
  147.     struct message msg;
  148.     ULONG counter;
  149.     char buffer[200];
  150.  
  151.     memset(&msg,0,sizeof(message));
  152.     msg.msg.mn_ReplyPort=replyport;
  153.     msg.msg.mn_Length=sizeof(message);
  154.     msg.msg_type=MSG_NREXX_START;
  155.     PutMsg(cport->rtport,(Message *)&msg);
  156.     WaitPort(replyport);
  157.     if (msg.msg_type==MSG_NREXX_OK)
  158.     {
  159.         sprintf(buffer,"rx %s",rexxprog->tempfile);
  160.         if (Execute(buffer,0,0))
  161.         {
  162.             msg.msg_type=MSG_NREXX_END;
  163.             PutMsg(cport->rtport,(Message *)&msg);
  164.             WaitPort(replyport);
  165.         }
  166.         else
  167.         {
  168.             printf("rexx execute error, ");
  169.         }
  170.     }
  171.     else
  172.     {
  173.         printf("client failait.\n");
  174.     }
  175.     if (!DeleteFile(rexxprog->tempfile))
  176.         printf("can't delete %s.\n",rexxprog->tempfile);
  177.  
  178.     if (replyport)DeleteMsgPort(replyport);
  179. }
  180.  
  181.  
  182.  
  183. void DoRexxMsg(RexxMsg *rexxmsg)
  184. {
  185.     struct PortData *cport=(PortData *)FindTask(NULL)->tc_UserData;
  186.     char buffer[256];
  187.     if (cport && rexxmsg)
  188.     {
  189.         if (rexxmsg->rm_Node.mn_ReplyPort==cport->rexxport)
  190.         {
  191.     /*        ioprintf("--REPLY--\n");
  192.             ioprintf("rm_Action  : %x\n",rexxmsg->rm_Action);
  193.             ioprintf("rm_Result1 : %d\n",rexxmsg->rm_Result1);
  194.             ioprintf("rm_Result2 : %d\n",rexxmsg->rm_Result2);
  195.             ioprintf("rm_Args[0] : %s\n",rexxmsg->rm_Args[0]);
  196.             ioprintf("rm_Args[1] : %s\n",rexxmsg->rm_Args[1]);
  197.             ioprintf("rm_Args[2] : %s\n",rexxmsg->rm_Args[2]);
  198.             ioprintf("rm_Args[3] : %s\n",rexxmsg->rm_Args[3]);
  199.             ioprintf("rm_CommAddr: %s\n",rexxmsg->rm_CommAddr);
  200.             ioprintf("rm_FileExt : %s\n",rexxmsg->rm_FileExt);
  201.             ioprintf("rm_avail   : %x\n",rexxmsg->rm_avail);*/
  202.             DeleteRexxMsg(rexxmsg);
  203.         }
  204.         else
  205.         {
  206.     /*        ioprintf("--INCOMMING--\n");
  207.             ioprintf("rm_Action  : %x\n",rexxmsg->rm_Action);
  208.             ioprintf("rm_Result1 : %d\n",rexxmsg->rm_Result1);
  209.             ioprintf("rm_Result2 : %d\n",rexxmsg->rm_Result2);
  210.             ioprintf("rm_Args[0] : %s\n",rexxmsg->rm_Args[0]);
  211.             ioprintf("rm_Args[1] : %s\n",rexxmsg->rm_Args[1]);
  212.             ioprintf("rm_Args[2] : %s\n",rexxmsg->rm_Args[2]);
  213.             ioprintf("rm_Args[3] : %s\n",rexxmsg->rm_Args[3]);
  214.             ioprintf("rm_CommAddr: %s\n",rexxmsg->rm_CommAddr);
  215.             ioprintf("rm_FileExt : %s\n",rexxmsg->rm_FileExt);
  216.             ioprintf("rm_avail   : %x\n",rexxmsg->rm_avail);*/
  217.             if (!strncmp("TRANSMIT",(char *)rexxmsg->rm_Args[0],7))
  218.             {
  219.                 Writeio((char *)(rexxmsg->rm_Args[0]+9),-1);
  220.                 LF();
  221.             }
  222.             if (!strncmp("GETUSER",(char *)rexxmsg->rm_Args[0],7))
  223.             {
  224.                 struct Date date;
  225.                 ULONG ulong;
  226.                 StrToLong((char *)(rexxmsg->rm_Args[0]+7),(LONG *)&ulong);
  227.                 switch (ulong)
  228.                 {
  229.                     case 1:  // User's Handle
  230.                         rexxmsg->rm_Result2=(ULONG)CreateArgstring(cport->LocalUser.Handle,strlen(cport->LocalUser.Handle));
  231.                         break;
  232.                     case 2:  // User's Password
  233.                         rexxmsg->rm_Result2=(ULONG)CreateArgstring(cport->LocalUser.PassWord,strlen(cport->LocalUser.PassWord));
  234.                         break;
  235.                     case 3:  // User's Full Real Name
  236.                         rexxmsg->rm_Result2=(ULONG)CreateArgstring(cport->LocalUser.RealName,strlen(cport->LocalUser.RealName));
  237.                         break;
  238.                     case 4:  // User's City
  239.                         rexxmsg->rm_Result2=(ULONG)CreateArgstring(cport->LocalUser.City,strlen(cport->LocalUser.City));
  240.                         break;
  241.                     case 5:  // User's Zip Code
  242.                         rexxmsg->rm_Result2=(ULONG)CreateArgstring(cport->LocalUser.ZipCode,strlen(cport->LocalUser.ZipCode));
  243.                         break;
  244.                     case 6:  // User's Street Address
  245.                         rexxmsg->rm_Result2=(ULONG)CreateArgstring(cport->LocalUser.Street,strlen(cport->LocalUser.Street));
  246.                         break;
  247.                     case 7:  // Time Remaining (Divide by 10 to Get Minutes)
  248.                         break;
  249.                     case 8:  // Sysop Comment
  250.                         {
  251.                             BPTR mulder;
  252.                             sprintf(buffer,"%s/%s",cport->sysdirs->userdir,cport->LocalUser);
  253.                             if (mulder=Open(buffer,MODE_OLDFILE))
  254.                             {
  255.                                 Seek(mulder,0,OFFSET_END);
  256.                                 ulong=Seek(mulder,0,OFFSET_BEGINNING);
  257.                                 if (ulong>200)ulong=199;
  258.                                 Read(mulder,buffer,ulong);
  259.                                 Close(mulder);
  260.                                 buffer[ulong]=0;
  261.                                 rexxmsg->rm_Result2=(ULONG)CreateArgstring(buffer,strlen(buffer));
  262.                             }
  263.                             else
  264.                                 rexxmsg->rm_Result2=(ULONG)CreateArgstring("",strlen(""));
  265.                         }
  266.                         break;
  267.                     case 9:  // VOICE Phone Number
  268.                         rexxmsg->rm_Result2=(ULONG)CreateArgstring(cport->LocalUser.PhoneNo,strlen(cport->LocalUser.PhoneNo));
  269.                         break;
  270.                     case 10:  // DATA  Phone Number
  271.                         rexxmsg->rm_Result2=(ULONG)CreateArgstring(cport->LocalUser.ModemNo,strlen(cport->LocalUser.ModemNo));
  272.                         break;
  273.                     case 11:  // Last Call Date (In Expanded "Tue 23-Mar-1993  7:25p" Format)
  274.                         DateToString(buffer,&cport->LocalUser.LastCall,0);
  275.                         rexxmsg->rm_Result2=(ULONG)CreateArgstring(buffer,sizeof(buffer));
  276.                         break;
  277.                     case 12:  // Current Date & Time (Can be Changed via EP's Time Zone!)
  278.                         GetTime(&date);
  279.                         DateToString(buffer,&date,0);
  280.                         rexxmsg->rm_Result2=(ULONG)CreateArgstring(buffer,sizeof(buffer));
  281.                         break;
  282.                     case 13:  // Total Number of EMails
  283.                         sprintf(buffer,"%u",cport->LocalUser.EMails);
  284.                         rexxmsg->rm_Result2=(ULONG)CreateArgstring(buffer,strlen(buffer));
  285.                         break;
  286.                     case 14:  // Total Number of NEW Mail Items Waiting
  287.                         sprintf(buffer,"%u",cport->LocalUser.NewMails);
  288.                         rexxmsg->rm_Result2=(ULONG)CreateArgstring(buffer,strlen(buffer));
  289.                         break;
  290.                     case 15:  // User's Access Group
  291.                         sprintf(buffer,"%u",cport->LocalUser.AccessGroup);
  292.                         rexxmsg->rm_Result2=(ULONG)CreateArgstring(buffer,strlen(buffer));
  293.                         break;
  294.                     case 16:  // Access Group Name
  295.                         sprintf(buffer,"%s",getstr(80,cport->LocalUser.AccessGroup));
  296.                         rexxmsg->rm_Result2=(ULONG)CreateArgstring(buffer,strlen(buffer));
  297.                         break;
  298.                     case 17:  // System Maintenance Access? (0=No, ~0=Yes)
  299.                         sprintf(buffer,"%d",cport->LocalUser.Flag_supervisor);
  300.                         rexxmsg->rm_Result2=(ULONG)CreateArgstring(buffer,strlen(buffer));
  301.                         break;
  302.                     case 18:  // Time Used TODAY (Divide by 10 to Get Minutes)
  303.                         break;
  304.                     case 19:  // Screen Clear Code (Ascii 12 - `L code)
  305.                         break;
  306.                     case 20:  // User's Current Owing Balance.
  307.                         break;
  308.                     case 21:  // Total Game/PFile/Door Points.
  309.                         break;
  310.                     case 22:  // Total Calls to the System By This User.
  311.                         sprintf(buffer,"%u",cport->LocalUser.TotalCalls);
  312.                         rexxmsg->rm_Result2=(ULONG)CreateArgstring(buffer,strlen(buffer));
  313.                         break;
  314.                     case 23:  // Current Port Number
  315.                         sprintf(buffer,"%d",cport->clientconfig.IDNumber);
  316.                         rexxmsg->rm_Result2=(ULONG)CreateArgstring(buffer,strlen(buffer));
  317.                         break;
  318.                     case 24:  // Current CPS (For BAUD, Multiply by 10)
  319.                         sprintf(buffer,"%d",cport->CurrentCPS/10);
  320.                         rexxmsg->rm_Result2=(ULONG)CreateArgstring(buffer,strlen(buffer));
  321.                         break;
  322.                     case 25:  // User's FILE RATIO Default (#1)
  323.                         sprintf(buffer,"%u",cport->LocalUser.FileCredits1);
  324.                         rexxmsg->rm_Result2=(ULONG)CreateArgstring(buffer,strlen(buffer));
  325.                         break;
  326.                     case 26:  // User's BYTE RATIO Default (#1)
  327.                         sprintf(buffer,"%u",cport->LocalUser.ByteCredits1);
  328.                         rexxmsg->rm_Result2=(ULONG)CreateArgstring(buffer,strlen(buffer));
  329.                         break;
  330.                     case 27:  // Current Line Width (In Columns)
  331.                         sprintf(buffer,"%u",cport->LocalUser.TermWidth);
  332.                         rexxmsg->rm_Result2=(ULONG)CreateArgstring(buffer,strlen(buffer));
  333.                         break;
  334.                     case 28:  // Terminal Type (0=Ascii, 1=C/G, 2=ANSI, 3=IBM, 4=Sky)
  335.                         sprintf(buffer,"%u",cport->LocalUser.CharSet);
  336.                         rexxmsg->rm_Result2=(ULONG)CreateArgstring(buffer,strlen(buffer));
  337.                         break;
  338.                     case 29:  // User's Default Protocol (Ascii Value 88=X,89=Y,90=Z,etc)
  339.                         sprintf(buffer,"%u",cport->LocalUser.DefProtocol);
  340.                         rexxmsg->rm_Result2=(ULONG)CreateArgstring(buffer,strlen(buffer));
  341.                         break;
  342.                     case 30:  // Total Uploaded KILO-Bytes
  343.                         sprintf(buffer,"%u",cport->LocalUser.TotalBytesUploads);
  344.                         rexxmsg->rm_Result2=(ULONG)CreateArgstring(buffer,strlen(buffer));
  345.                         break;
  346.                     case 31:  // Total Uploaded Files
  347.                         sprintf(buffer,"%u",cport->LocalUser.TotalUploads);
  348.                         rexxmsg->rm_Result2=(ULONG)CreateArgstring(buffer,strlen(buffer));
  349.                         break;
  350.                     case 32:  // Total Downloaded KILO-Bytes
  351.                         sprintf(buffer,"%u",cport->LocalUser.TotalBytesDownloads);
  352.                         rexxmsg->rm_Result2=(ULONG)CreateArgstring(buffer,strlen(buffer));
  353.                         break;
  354.                     case 33:  // Total Downloaded Files
  355.                         sprintf(buffer,"%u",cport->LocalUser.TotalDownloads);
  356.                         rexxmsg->rm_Result2=(ULONG)CreateArgstring(buffer,strlen(buffer));
  357.                         break;
  358.                     case 34:  // Total File Credits
  359.                         sprintf(buffer,"%u",cport->LocalUser.FileCredits);
  360.                         rexxmsg->rm_Result2=(ULONG)CreateArgstring(buffer,strlen(buffer));
  361.                         break;
  362.                     case 35:  // Total Byte Credits
  363.                         break;
  364.                         sprintf(buffer,"%u",cport->LocalUser.ByteCredits);
  365.                         rexxmsg->rm_Result2=(ULONG)CreateArgstring(buffer,strlen(buffer));
  366.                     case 36:  // Total Public  Messages
  367.                         break;
  368.                         sprintf(buffer,"%u",cport->LocalUser.TotalPosts);
  369.                         rexxmsg->rm_Result2=(ULONG)CreateArgstring(buffer,strlen(buffer));
  370.                     case 37:  // Total Private Messages
  371.                         break;
  372.                         sprintf(buffer,"%u",cport->LocalUser.TotalEMails);
  373.                         rexxmsg->rm_Result2=(ULONG)CreateArgstring(buffer,strlen(buffer));
  374.                     case 38:  // User's WHO Banner
  375.                         rexxmsg->rm_Result2=(ULONG)CreateArgstring(cport->LocalUser.Banner,strlen(cport->LocalUser.Banner));
  376.                         break;
  377.                     case 39:  // Users UUCP Directory
  378.                         rexxmsg->rm_Result2=(ULONG)CreateArgstring(cport->LocalUser.Banner,strlen(cport->LocalUser.UUCP));
  379.                         break;
  380.                     case 40:  // User's Account Number
  381.                         sprintf(buffer,"%d",cport->LocalUser.IDNumber);
  382.                         rexxmsg->rm_Result2=(ULONG)CreateArgstring(buffer,strlen(buffer));
  383.                         break;
  384.                     case 41:  // User's Unique ID Number (Serial ID Number)
  385.                         sprintf(buffer,"%d",cport->LocalUser.IPNumber);
  386.                         rexxmsg->rm_Result2=(ULONG)CreateArgstring(buffer,strlen(buffer));
  387.                         break;
  388.                     case 42:  // Total Bytes uploaded   TODAY
  389.                         break;
  390.                     case 43:  // Total Bytes downloaded TODAY
  391.                         break;
  392.                     case 44:  // Total Files uploaded   TODAY
  393.                         break;
  394.                     case 45:  // Total Files downloaded TODAY
  395.                         break;
  396.                     case 46:  // Time of Day MCI (Morning, Afternoon, Evening)      (Was \v7)
  397.                         break;
  398.                     case 47:  // Which Caller Am I Today?
  399.                         break;
  400.                     case 48:  // Current Subboard Number (For Use In Prompts)       (Was \vy)
  401.                         break;
  402.                     case 49:  // Current Subboard Name   (For Use In Prompts)       (Was \vz)
  403.                         break;
  404.                     case 50:  // Last Caller Handle MCI (Current Port Only)         (Was \vj)
  405.                         break;
  406.                     case 51:  // Posting  Access in Current Subboard? (1=Yes, 0=No) (Was \ty)
  407.                         break;
  408.                     case 52:  // Respond  Access in Current Subboard? (1=Yes, 0=No) (Was \tz)
  409.                         break;
  410.                     case 53:  // Download Access in Current Subboard? (1=Yes, 0=No) (Was \tw)
  411.                         break;
  412.                     case 54:  // Upload   Access in Current Subboard? (1=Yes, 0=No) (Was \tx)
  413.                         break;
  414.                     case 55:  // User's Help Level (0=Nov,1=Int,2=Exp,3=Sup)        (Was \t9)
  415.                         break;
  416.                     case 56:  // User Online's Country
  417.                         break;
  418.                     case 57:  // User Online's Logon Time
  419.                         break;
  420.                     case 58:  // User Online's Birthdate
  421.                         break;
  422.                     case 59:  // User Online's Organization
  423.                         break;
  424.                     case 60:  // MCI Numeric Register # 0 (For Math, Testing, Viewing, etc.)
  425.                         break;
  426.                     case 61:  // MCI Numeric Register # 1 (For Math, Testing, Viewing, etc.)
  427.                         break;
  428.                     case 62:  // MCI Numeric Register # 2 (For Math, Testing, Viewing, etc.)
  429.                         break;
  430.                     case 63:  // MCI Numeric Register # 3 (For Math, Testing, Viewing, etc.)
  431.                         break;
  432.                     case 64:  // MCI Numeric Register # 4 (For Math, Testing, Viewing, etc.)
  433.                         break;
  434.                     case 65:  // MCI Numeric Register # 5 (For Math, Testing, Viewing, etc.)
  435.                         break;
  436.                     case 66:  // MCI Numeric Register # 6 (For Math, Testing, Viewing, etc.)
  437.                         break;
  438.                     case 67:  // MCI Numeric Register # 7 (For Math, Testing, Viewing, etc.)
  439.                         break;
  440.                     case 68:  // MCI Numeric Register # 8 (For Math, Testing, Viewing, etc.)
  441.                         break;
  442.                     case 69:  // MCI Numeric Register # 9 (For Math, Testing, Viewing, etc.)
  443.                         break;
  444.                     case 70:  // MCI String Variable (The {i } Command)
  445.                         break;
  446.                     case 71:  // MCI Character Value (The {g1} Command)
  447.                         break;
  448.                     case 72:  // MCI Character Value (The {g2} Command)
  449.                         break;
  450.                     case 73:  // MCI Character Value (The {g3} Command)
  451.                         break;
  452.                     case 74:  // MCI Character Value (The {g4} Command)
  453.                         break;
  454.                     case 75:  // From (Primary name)     (header only)   [Used in BBSTEXT]
  455.                         break;
  456.                     case 76:  // From (Secondary name)   (header only)   [Used in BBSTEXT]
  457.                         break;
  458.                     case 77:  // To   (Primary name)     (header only)   [Used in BBSTEXT]
  459.                         break;
  460.                     case 78:  // To   (Secondary name)   (header only)   [Used in BBSTEXT]
  461.                         break;
  462.                     case 79:  // Date                    (header only)   [Used in BBSTEXT]
  463.                         break;
  464.                     case 80:  // Organization (Post/Res) (header only)   [Used in BBSTEXT]
  465.                         break;
  466.                     case 81:  // Current Item #          (header, scan)  [Used in BBSTEXT]
  467.                         break;
  468.                     case 82:  // Current response #      (header only)   [Used in BBSTEXT]
  469.                         break;
  470.                     case 83:  // Total # of responses    (header, scan)  [Used in BBSTEXT]
  471.                         break;
  472.                     case 84:  // Item size in bytes      (header, scan)  [Used in BBSTEXT]
  473.                         break;
  474.                     case 85:  // Total downloads         (header, scan)  [Used in BBSTEXT]
  475.                         break;
  476.                     case 86:  // Best CPS                (header, scan)  [Used in BBSTEXT]
  477.                         break;
  478.                     case 87:  // Item title              (header, scan)  [Used in BBSTEXT]
  479.                         break;
  480.                     case 88:  // Size in K/Meg           (scan only)     [Used in BBSTEXT]
  481.                         break;
  482.                     case 89:  // +/-/!/v/p flag          (scan only)     [Used in BBSTEXT]
  483.                         break;
  484.                     case 90:  // * flag                  (scan only)     [Used in BBSTEXT]
  485.                         break;
  486.                     case 91:  // Root filename           (scan only)     [Used in BBSTEXT]
  487.                         break;
  488.                     case 92:  // Filename suffix         (scan only)     [Used in BBSTEXT]
  489.                         break;
  490.                     case 93:  // Short date              (scan only)     [Used in BBSTEXT]
  491.                         break;
  492.                     case 94:  // Download time           (header only)   [Used in BBSTEXT]
  493.                         break;
  494.                 }
  495.             }
  496.             if (!strncmp("CALLEDITOR",(char *)rexxmsg->rm_Args[0],10))
  497.             {
  498.                 VisualEditor("ram:itsmir",0,VISUALEDIT_FILE);
  499.             }
  500.             if (!strncmp("CHANGEWHERE",(char *)rexxmsg->rm_Args[0],11))
  501.             {
  502.                 strcpy(cport->Where,rexxmsg->rm_Args[0]+11);
  503.             }
  504.             if (!strncmp("CHANGEWHAT",(char *)rexxmsg->rm_Args[0],10))
  505.             {
  506.                 strcpy(cport->Where,rexxmsg->rm_Args[0]+10);
  507.             }
  508.             if (!strncmp("CLOSEDISPLAY",(char *)rexxmsg->rm_Args[0],12))
  509.                 Monitor_close();
  510.             {
  511.             }
  512.             if (!strncmp("CLS",(char *)rexxmsg->rm_Args[0],3))
  513.             {
  514.                 CLS();
  515.             }
  516.             if (!strncmp("DROPCARRIER",(char *)rexxmsg->rm_Args[0],11))
  517.             {
  518.                 cport->network.online=FALSE;
  519.             }
  520.             if (!strncmp("FINDACCOUNT",(char *)rexxmsg->rm_Args[0],11))
  521.             {
  522. //                rexxmsg->rm_Result2=(ULONG)CreateArgstring(buffer,strlen(buffer));
  523. //                FindAccount
  524.             }
  525.             if (!strncmp("GETCARRIER",(char *)rexxmsg->rm_Args[0],10))
  526.             {
  527.             }
  528.             if (!strncmp("GETSCRATCH",(char *)rexxmsg->rm_Args[0],10))
  529.             {
  530.             }
  531.             if (!strncmp("GETCHAR",(char *)rexxmsg->rm_Args[0],7))
  532.             {
  533.             }
  534.             if (!strncmp("HANGUP",(char *)rexxmsg->rm_Args[0],6))
  535.             {
  536.                 cport->network.online=FALSE;
  537.             }
  538.             if (!strncmp("LOADUSER",(char *)rexxmsg->rm_Args[0],8))
  539.             {
  540.             }
  541.             if (!strncmp("IREADY",(char *)rexxmsg->rm_Args[0],6))        // carrier set ?
  542.             {
  543.             }
  544.             if (!strncmp("LOADEDITOR",(char *)rexxmsg->rm_Args[0],10))
  545.             {
  546.             }
  547.             if (!strncmp("LOGENTRY",(char *)rexxmsg->rm_Args[0],8))
  548.             {
  549.             }
  550.             if (!strncmp("MAYGETCHAR",(char *)rexxmsg->rm_Args[0],10))
  551.             {
  552.             }
  553.             if (!strncmp("MODEM",(char *)rexxmsg->rm_Args[0],5))
  554.             {
  555.             }
  556.             if (!strncmp("NEWLINE",(char *)rexxmsg->rm_Args[0],7))
  557.             {
  558.                 LF();
  559.             }
  560.             if (!strncmp("OPENDISPLAY",(char *)rexxmsg->rm_Args[0],11))
  561.             {
  562.                 Monitor_open();
  563.             }
  564.             if (!strncmp("PRINT",(char *)rexxmsg->rm_Args[0],5))
  565.             {
  566.             }
  567.             if (!strncmp("PROMPT",(char *)rexxmsg->rm_Args[0],6))
  568.             {
  569.             }
  570.             if (!strncmp("PUTSCRATCH",(char *)rexxmsg->rm_Args[0],10))
  571.             {
  572.             }
  573.             if (!strncmp("PUTUSER",(char *)rexxmsg->rm_Args[0],7))
  574.             {
  575.             }
  576.             if (!strncmp("QUERY",(char *)rexxmsg->rm_Args[0],5))
  577.             {
  578.             }
  579.             if (!strncmp("RECEIVE",(char *)rexxmsg->rm_Args[0],7))
  580.             {
  581.             }
  582.             if (!strncmp("RESETMODEM",(char *)rexxmsg->rm_Args[0],10))
  583.             {
  584.             }
  585.             if (!strncmp("SAVEEDITOR",(char *)rexxmsg->rm_Args[0],10))
  586.             {
  587.             }
  588.             if (!strncmp("SAVESCRATCH",(char *)rexxmsg->rm_Args[0],11))
  589.             {
  590.             }
  591.             if (!strncmp("SCREENOUT",(char *)rexxmsg->rm_Args[0],9))
  592.             {
  593.             }
  594.             if (!strncmp("SENDSTRING",(char *)rexxmsg->rm_Args[0],10))
  595.             {
  596.             }
  597.             if (!strncmp("SEND",(char *)rexxmsg->rm_Args[0],4))
  598.             {
  599.             }
  600.             if (!strncmp("SETMAILSUBJ",(char *)rexxmsg->rm_Args[0],11))
  601.             {
  602.             }
  603.             if (!strncmp("SETMINFREE",(char *)rexxmsg->rm_Args[0],10))
  604.             {
  605.             }
  606.             if (!strncmp("SETNODELOCATION",(char *)rexxmsg->rm_Args[0],15))
  607.             {
  608.             }
  609.             if (!strncmp("SETOBJECT",(char *)rexxmsg->rm_Args[0],9))
  610.             {
  611.             }
  612.             if (!strncmp("SETPROTOCOL",(char *)rexxmsg->rm_Args[0],11))
  613.             {
  614.             }
  615.             if (!strncmp("SHUTDOWN",(char *)rexxmsg->rm_Args[0],8))
  616.             {
  617.             }
  618.             if (!strncmp("SPAWN",(char *)rexxmsg->rm_Args[0],5))
  619.             {
  620.             }
  621.             if (!strncmp("SYSOPLOG",(char *)rexxmsg->rm_Args[0],8))
  622.             {
  623.             }
  624.             if (!strncmp("VERSION",(char *)rexxmsg->rm_Args[0],7))
  625.             {
  626.             }
  627.             if (!strncmp("WRITEMAIL",(char *)rexxmsg->rm_Args[0],9))
  628.             {
  629.             }
  630.             if (!strncmp("XDN",(char *)rexxmsg->rm_Args[0],3))
  631.             {
  632.             }
  633.             if (!strncmp("XUP",(char *)rexxmsg->rm_Args[0],3))
  634.             {
  635.             }
  636.  
  637.             ReplyMsg((Message *)rexxmsg);
  638.         }
  639.     }
  640. }
  641.  
  642.